package cn.iune.erp.sale;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.JSONObject;

import cn.iune.common.base.IBizDataIface;

public interface ISaleOrderService extends IBizDataIface {

	List<SaleOrder> getAll();

	SaleOrder getByID(String fID);

	void delete(String fID);

	SaleOrder getByNo(String orderNo, String enterpriseNo);


	int confirm(String fID);

	int active(String fID);

	int close(String fID);

	int open(String fID);

	int agreeIt(String fID);

	int unAgree(String fID);


	void insert(SaleOrder obj);

	ArrayList<BigDecimal> getAmountMonth(String year, ArrayList<String> xAxisData, String enterpriseNo);

//	int updatePredictAmounting(String orderNo, String enterpriseNo, BigDecimal predictAmount);

	public List<SaleOrder> getByLoginName(String sLoginName);

	SaleOrder update(SaleOrder obj);

	long getUnAgreeCount(String enterpriseNo);

	SaleOrder packing(String billType, String billTypeName, String systemCode, int flowType, String autoCode,
			String origin, String originName, String billNo, String cUsercode, String cUsername, String userId,
			String enterpriseNo, String enterpriseName);


	long getCount(String sLoginName, String handling);

	JSONObject save(JSONObject object) throws ParseException;

	JSONObject saveDetail(JSONObject object) throws ParseException;

	JSONObject newDataDetail(JSONObject param);

	JSONObject queryDataDetail(JSONObject param);

	int finished(String fID);

	int cancelled(String fID);



	List<SaleOrderDetail> getByMasterID(String fMasterID);

	JSONObject querySimple(JSONObject data) ;



	int updateSettleCategory(String fID, String settleCategory, String settleCategoryLabel);


	int updateStoreItemAmount(String orderNo, String serialNo, String enterpriseNo, BigDecimal storeItemAmount);

	int updatePickItemQuantityIng(String orderNo, String serialNo, String enterpriseNo, BigDecimal itemQuantity,
			BigDecimal wasterQuantity, BigDecimal ullageQuantity, BigDecimal arriveQuantityBack);

	int updatePickItemQuantity(String orderNo, String serialNo, String enterpriseNo, BigDecimal itemQuantity,
			BigDecimal wasterQuantity, BigDecimal ullageQuantity, BigDecimal arriveQuantityBack,
			BigDecimal pieceQuantity);

	int updateBackItemQuantity(String orderNo, String serialNo, String enterpriseNo, BigDecimal itemQuantity,
			BigDecimal pieceQuantity);

	int updatePickItemQuantityIng(String fID, BigDecimal itemQuantity);

	int updatePickItemQuantity(String fID, BigDecimal itemQuantity);

	int delivered(String orderNo, String enterpriseNo);

	int delivered(SaleOrder so);

	int delivered(String fID);

	BigDecimal getUnpaidXSDDAmount(String customerID, String enterpriseNo);

	int updateStorage(String fID, String storageType, String storageTypeLabel, String storageID,
			String storageNo, String storageName, String floorNo, String factoryID, String factoryNo,
			String factoryName);

	List<SaleOrder> getBySsID(String serviceSessionID);

	JSONObject updateDetailItemAmount(JSONObject data);

	JSONObject discountAmount(String fID, BigDecimal discountAmountTotal);

	JSONObject discountAmount(SaleOrder obj, BigDecimal discountAmountTotal);

	SaleOrder updateCustomer(String fID, String storageTypeD, String storageTypeDLabel, String customerID,
			String customerNo, String shortName, String customerName);

	int oncePay(String orderNo, String enterpriseNo, BigDecimal discountCash, BigDecimal actualAmount,
			String guestNumber);

	JSONObject jointData(JSONObject param);



		
}